﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="PositionBanner.aspx.cs" Inherits="Admin_PositionBanner" %>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="Server">
    <div id="page-heading">
        <h1>
            Add or Update Position</h1>
    </div>
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
        <tr>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
            <th class="topleft">
            </th>
            <td id="tbl-border-top">
                &nbsp;</td>
            <th class="topright">
            </th>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
        </tr>
        <tr>
            <td id="tbl-border-left">
            </td>
            <td>
                <!--  start content-table-inner -->
                <div id="content-table-inner">
                    <table border="0" width="100%" cellpadding="0" cellspacing="0">
                        <tr valign="top">
                            <td>
                                <div style="width: 920px; float: left;">
                                    <div style="width: 460px; float: left;">
                                        <table border="0" cellpadding="0" cellspacing="0" id="id-form">
                                            <tr>
                                                <td colspan="2">
                                                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                                        <contenttemplate>
                                                <div style="width: 460px; float: left; padding-bottom:10px;">
                                                    <div style="float:left; width:100px;">
                                                      <strong>  Page:</strong>
                                                    </div>
                                                    <div style="float:left; width:320px;">
                                                        <asp:DropDownList ID="ddlCategory" runat="server" Width="320px" AutoPostBack="true"
                                                        OnSelectedIndexChanged="ddCategory_OnSelectedIndexChanged">
                                                    </asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div style="width: 460px; float: left;">
                                                    <div style="float:left; width:100px;">
                                                       <strong> Position on page:</strong>
                                                    </div>
                                                    
                                                    <div style="width: 320px; float:left">
                                                        <asp:DropDownList ID="ddlSubCat" runat="server" Width="320px">
                                                        </asp:DropDownList>
                                                    </div>                                                  
                                                </div>
                                                </contenttemplate>
                                                    </asp:UpdatePanel>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th valign="top">
                                                    Size:</th>
                                                <td>
                                                    <div style="width: 320px">
                                                        <asp:DropDownList ID="ddlSize" runat="server" Width="320px">
                                                        </asp:DropDownList>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th valign="top">
                                                    Position Name:</th>
                                                <td>
                                                    <div style="width: 320px">
                                                        <asp:TextBox ID="txtName" runat="server" Width="320px"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th valign="top">
                                                    price1:</th>
                                                <td>
                                                    <div style="width: 320px">
                                                        <asp:TextBox ID="txtPrice1" runat="server" Width="320px" Text="0"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th valign="top">
                                                    price2:</th>
                                                <td>
                                                    <div style="width: 320px">
                                                        <asp:TextBox ID="txtprice2" runat="server" Width="320px" Text="0"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                    <!-- end id-form  -->
                                    <div style="width: 460px; float: left;">
                                        <table border="0" cellpadding="0" cellspacing="0" id="Table2">
                                            <tr>
                                                <th valign="top">
                                                    Description:</th>
                                                <td>
                                                    <FCKeditorV2:FCKeditor ID="fck_Desc" runat="server" Width="400px" ToolbarSet="RTI"
                                                        Height="230px" ToolbarCanCollapse="false" BasePath="~/Javascripts/FCKEditor/">
                                                    </FCKeditorV2:FCKeditor>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                                <div style="width: 700px; margin-left: 100px; float: left; padding-top: 20px;">
                                    <asp:Button ID="btnsave" CausesValidation="true" OnClientClick="return CheckValue()"
                                        CssClass="form-submit" Text="Save" runat="server" OnClick="btnsave_Click" />
                                    <asp:Button ID="btnexit" CssClass="form-reset" runat="server" OnClick="btnBack_Click"
                                        CausesValidation="False" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <img src="images/shared/blank.gif" width="695" height="1" alt="blank" /></td>
                            <td>
                            </td>
                        </tr>
                    </table>
                    <div class="clear">
                    </div>
                </div>
                <!--  end content-table-inner  -->
            </td>
            <td id="tbl-border-right">
            </td>
        </tr>
        <tr>
            <th class="sized bottomleft">
            </th>
            <td id="tbl-border-bottom">
                &nbsp;</td>
            <th class="sized bottomright">
            </th>
        </tr>
    </table>
    <div class="clear">
        &nbsp;</div>
       
       <%--<div class="divcontent">
        <table>
            <tr>
                <td style="color: #ff0033; width: 374px;">
                    <asp:Literal ID="ltrNote" runat="server"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td style="width: 374px;">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <contenttemplate>
                        <TABLE style="WIDTH: 336px;">
                            <TBODY>
                            <TR>
                                <TD style="WIDTH: 120px">
                                    <STRONG>Trang :</STRONG></TD>
                                <TD style="WIDTH: 166px"><asp:DropDownList id="ddlCategory" runat="server" Width="200" AutoPostBack="true" OnSelectedIndexChanged="ddCategory_OnSelectedIndexChanged"> </asp:DropDownList> </TD>
                            </TR>
                            <TR>
                                <TD style="WIDTH: 120px">
                                    <STRONG>Vị Trí Trên Trang :</STRONG></TD>
                                <TD style="WIDTH: 166px"><asp:DropDownList id="ddlSubCat" runat="server" Width="200" AutoPostBack="true" OnSelectedIndexChanged="ddlSubCat_OnSelectedIndexChanged"></asp:DropDownList> </TD>
                            </TR>
                            <TR>
                                <TD style="WIDTH: 120px">
                                    <STRONG>Vị Trí :</STRONG> </TD>
                                <TD style="WIDTH: 166px"><asp:DropDownList id="ddlPosition" runat="server" Width="200"></asp:DropDownList> </TD>
                            </TR>
                            <TR>
                                <TD style="WIDTH: 120px">
                                    <STRONG>Member :</STRONG> </TD>
                                <TD style="WIDTH: 166px"><asp:DropDownList id="ddlMember" runat="server" Width="200"></asp:DropDownList> </TD>
                            </TR>
                            <TR>
                                <TD style="WIDTH: 120px">
                                    <STRONG>Tên Banner:</STRONG> </TD>
                                <TD style="WIDTH: 166px"><asp:TextBox id="txtName" runat="server" Width="192px"></asp:TextBox> </TD>
                            </TR>
                            <TR>
                                <TD style="WIDTH: 120px">
                                    <STRONG>Ngày Bắt Đầu:</STRONG> </TD>
                                <TD style="WIDTH: 166px"><asp:TextBox id="txtStartDate" runat="server" Width="150px"></asp:TextBox>
                                     <input id="Button2" type="button" onclick="displayDatePicker(document.getElementById('<%=txtStartDate.ClientID%>').name , false,'<%=RTISettings.FormatDateToCalendar%>','/');"
                                        value="..." style="width: 25px;" />
                                         <asp:CustomValidator ID="Customvalidator1" runat="server" ClientValidationFunction="ClientValidationDateTime"
                                            ControlToValidate="txtStartDate">*</asp:CustomValidator>
                                 </TD>
                            </TR>
                            <TR>
                                <TD style="WIDTH: 120px">
                                    <STRONG>Ngày Kết Thúc:</STRONG> </TD>
                                <TD style="WIDTH: 166px"><asp:TextBox id="txtEndDate" runat="server" Width="150px"></asp:TextBox>
                                    <input id="Button1" type="button" onclick="displayDatePicker(document.getElementById('<%=txtEndDate.ClientID%>').name , false,'<%=RTISettings.FormatDateToCalendar%>','/');"
                                        value="..." style="width: 25px;" />
                                         <asp:CustomValidator ID="Customvalidator2" runat="server" ClientValidationFunction="ClientValidationDateTime"
                                            ControlToValidate="txtEndDate">*</asp:CustomValidator>
                                
                                 </TD>
                            </TR>
                            <TR>
                                <TD style="WIDTH: 120px">
                                    <STRONG>URl File :</STRONG> </TD>
                                <TD style="WIDTH: 166px">
                                    <asp:FileUpload id="UploadeFile" runat="server" width="190px"></asp:FileUpload>
                                    
                                    <div class="Row">                                        
                                        <asp:Image ID="img_Pic" runat="server" width="200px" height="200px" />
                                    </div>
                                    <div runat="server" id="div_Flash" visible="false">
                                        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
                                            width="200" height="200">
                                            <param name="movie" value="<%=this.URL%>" />
                                            <param name="quality" value="high" />
                                            <embed src="<%=this.URL%>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
                                                type="application/x-shockwave-flash" width="200" height="200"></embed>
                                        </object>
                                    </div>
                                </TD>
                            </TR>
                            <TR>
                                <TD style="WIDTH: 120px">
                                    <STRONG>Flash :</STRONG> </TD>
                                <TD style="WIDTH: 166px">
                                    <asp:CheckBox id="ckFlash" runat="server"></asp:CheckBox>
                                </TD>
                            </TR>
                            <TR>
                                <TD style="WIDTH: 120px">
                                    <STRONG>Url Link :</STRONG> </TD>
                                <TD style="WIDTH: 166px"><asp:TextBox id="txtLink" runat="server" Width="192px"></asp:TextBox> </TD>
                            </TR>
                        </TBODY>
                    </TABLE>
                    </contenttemplate>
                    </asp:UpdatePanel>
                </td>
                <td style="width: 374px;" valign="top">
                    <table style="width: 370px;">
                        <tr>
                            <td style="width: 70px">
                                <strong>Mô tả :</strong>
                            </td>
                            <td style="width: 300px" align="left">
                                <FCKeditorV2:FCKeditor ID="fck_Desc" runat="server" Width="300px" ToolbarSet="RTI"
                                    Height="330px" ToolbarCanCollapse="false" BasePath="~/Javascripts/FCKEditor/">
                                </FCKeditorV2:FCKeditor>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td style="width: 374px">
                    <table>
                        <tr>
                            <td style="width: 290px; float: left" align="right">
                                <asp:Button ID="btnsave" CssClass="bbutton" runat="server" OnClick="btnsave_Click"
                                    Width="90px" Text="Lưu" CausesValidation="true" />
                                <asp:Button CssClass="bbutton" ID="btnBack" runat="server" Text="Clear text" ValidationGroup="2"
                                    CausesValidation="false" OnClick="btnBack_Click" />
                            </td>
                        </tr>
                    </table>
                </td>
                <td style="width: 240px">
                </td>
            </tr>
        </table>
    </div>--%>
       
       
        <script type="text/javascript">
            function CheckValue()
            {
                {
                
                 var ddlCategory=document.getElementById("<%=ddlCategory.ClientID%>");
                 var ddlSubCat=document.getElementById("<%=ddlSubCat.ClientID%>");
                 var ddlSize=document.getElementById("<%=ddlSize.ClientID%>");           
                 var txtName=document.getElementById("<%=txtName.ClientID%>");
                 if(txtName.value=='')
                 {
                    alert('Name is not Null !');
                    return false;
                 }                 
                 if(ddlCategory.value=='0')
                 {
                    alert('Page is Not Null !');
                    return false;
                 }
                 if(ddlSubCat.value=='0')
                 {
                    alert('Position is on page not null !');
                    return false;
                 }
                 if(ddlSize.value=='0')
                 {
                    alert('Size is not Null !');
                    return false;
                 }
                 
                 
                
            }
            }
    </script>
</asp:Content>
